Tweaks trying to remove memoru leak