fixes bug of nil class