Fixed most of the problems with dynamic code mapping