Add quick and dirty page leave prevention. Fixes #37