Fix controller bugs