found + fixed error causing segfaults.