fixed gcc 3.6 bug
make ui refresh work properly