Added status check to controller