some critical bugs are fixed
Constant have constructor to identify local or server