some fixes for the build process and the offline mode