Fix compile error with IDE 1.0.5

- Fix compile error
- some minor changes