fix undefined method reverse for nil:NilClass