Fixing sleep problem by running client once