Fix bogus pointer arithmetic