Fixing bugs for inserting roles