fixed duplication in switchFragment