adding image parameter, other fixes.