Improve granularity of GD function detection