Added Thread.sleep to fix the build