leanpub compatibility fixes