fixed back button and routing issues