Fixes case when scope is a long filename.