Hash table does not function, segfaults