Replaced &ptr[0] with ptr.