merge latest commits and revise my bugs.