Fix trying to acces data of Nil