Resolve paths correctly