port fix
nullpointer fixes