added hacky wait to ignore race condition