Added a time limiter to getcmd