gii tweaks and bugfixes