image-prep fixes and json fixes