Fixed menu generation only displaying last file