Fixed few things with the hasty implementation of global waitons.