Added code to disable history navigation. This code is not ideal, but it can be useful.