More bug fixes and added Interface::wait