some seg fault issues fixed