Changed condition for peak finding