Fixes for insert() return value