Fixed 'lastrun' and 'lastalarm' assignments.