Fixed db error saving role assignments