some cleanups. Much less frequent crashes. but crash is still there