resolve paths correctly