more core stability fixes. prevent core dumps