Custom memory patch work (based on Sean Chittenden's patch)