removed redundant code and one more sleep fix