Wait bad return value solved