fixed NPE onload