fixed switching side bug