Fixed code serialization bug in load function, and fixed multiple-cycle execution
fixed #1