Fix controller code.