Fixing the controller generation script