fixed errors with controllers