Fix path script to support all engines