Added a sleep to wait before sending the refresh command.