Cam 2392

Fixes for CAM-2392 and CAM-2443. 

This replaced my former pull request.