Fix errors introduced by a previous refactor on the controller of application deployment