Fixed the earlier merge for finding the previous sheet, fixed scheduler running even after application was shutdown