Bad pointer bug fix.