Fix error undefined method admin for nil