Try the following:
1. Validate problematic epubs with the
IDPF online validator to check for structural errors.
2. Right-click the epub in Calibre, select
Edit book, click
Run check, click
Try to fix all correctable error automatically and then save the epub.