fixed wrong free command