Fixes issue with base path detection.