fixed usleep bug