Memory crash issue solved