changes for ptr bug