bug fixes

for subgame and directory