fix a headack bug