sync with latest version, minor fixes