fixed violation error

still heap problem