fixed some npe