fixed a bug in switching to multi mode