fix bugs, includes switch portal, shell session, command