View active and deactive weren't defined correctly