Fixed up path and made compilation more robust