Some pointer dereference bugfixes.