fixes some segfaults