Fix handling of pointers