Bugfix/4351 faster directory query