Fix issue with main path resolution