fixed mixup model and insertId, if insertid wasn't defined