Fixed nullpointer handling in local loader.