Further change to protect from invalid lasttime values