fix application controller
improve before_validation