Fixed small nullpointer bug in load()