Fix bug rendering directory indexes