Image insertion fixes