Please, read this thread:
https://www.mobileread.com/forums/sho...d.php?t=212300
https://www.mobileread.com/forums/sho...71&postcount=7
It's about mobi files but also is valid for epub files (in fact, you'll find there several epubs converted into mobis).