Fixing issues with lib/core/mount.js