applied patch from Retzu