fix null pointer exception after load