attempt to fix memory corruption