Wait statment fixed