fix global extern detection