Apply various hacks and fix loading bug