a couple fixes, the subshell implementation is still buggy unfortunately