gain working properly