Quick fixes for everything, it basically works.

Problem: wait() doesnt always wait