Try to set path intelligently.