creating and deleting user groups

Hi Devs
I have couple of problems in user groups.
1. Deleting: After creating a user group, sharing an dashboard with it and then deleting the dashboard the system won't let me delete the group.
2. Creating a group: After deleting a group, if you try to create a new group and include any of the users that were part of the deleted group an exception occurs.

I tested this in DHIS2 App Hub

Any ideas on how to solve this?

Best regards,