support for g_mindist and g_sgangle
+ bugfixes