fixed a javascript back button bug