fixed the "setLastView" bug