fixed reverse of nil bug