got rid of the fishy null-pointer dereference-but-not-quite hack