Fixing CONTRIB-4824 and polisihing code style