fixed a bug occurred re-compiling