minor bugfix in custom_directory option