modify some bug by JackeyFoo @ 20130409-16:16