fix from Oleg Kruk