fix extern issue