CORE-4032: fixed a couple of minor bugs