solved minor bug in load function.