fixed small null bugs