fix env and config path resolution