Fixed broken function scanning