Fixes for MOB-836 and MOB-766.