Got a weird null pointer exception on valgrind, so let's try this just in case ..