Fixes for tests, bad placement and bad wait