Fix name as filename bug