Environment variables were not properly being checked by path_to_executable