Fixes to make image capture work