Bug Fixes

-Improved peak detection conditions
-Bug fix for signals with zero peaks