Tried to fix a bug in singlemode