So stopping the function in the same frame before level_free() is not enough?
Well this tells then where the wait(1) comes from.

Without level_free() no wait(1) is needed.