Adding 2 quick fixes from master

Adding #1410 and #1408 to emergency branch.