keyGroupTest and bugfix