fixed autonomous timer while loop