Fix not bug.
Increase timeout.
Add button to stop waiting for response instead of using a timeout.

Many commands can take different amounts of time, it's hard to give a single time for them all.
Try parsing command input into an array if not already an array.