fix for REV-504 and REV-514