Fixed an issue where an int value was being used for Thread.sleep.
Changed to long instead of integer.