[pc_functions] path is now added to local_env and fixed MAJOR bugs