Fix env server missposing

debug several critical bugs. however it's not completed yet...

![screenshot_from_2014-10-02 23 26 14](https://cloud.githubusercontent.com/assets/40454/4492306/1ced0b3e-4a40-11e4-8d39-db6212c74f5b.png)