Fixes some bugs with User groups and in wity.sql