buggy implementation... Need some time to find a leak