Fixed an error with empty folders.