fixed last_run bug - thanks tknorris