sync from svn. bug fix. warning fix.