Dmitry Cherniavsky fixes