free the mem to check if thats the problem