bug fixes: directory computation