Enhanced the memory test page with some failsafes