fixed bugs with back stack