fix from Vladimir Botov