fix errors in controllers