Ptr error solved