Fix input validation and code style in acp controllers