Added gain initialization in controller