Fixed bug in secsCor function - wouldn't read NaN??