Fixed the threshold with a gain