bug in insert_master