Fixes bug, caches pid commands