fixed resume bug in timer