Fixing various entry point bugs