Fix some errors in CodeBatlle controller.