Fixed minor issue causing alarm to be set in the past