Remove unnecessary wait and small bugfix