Removed debug prints and corrected wait_queue_empty