add ui for sub dirs
fix a minor bug