Fixed path issues

Ready to be merged with master