Fixed bug where the old code prevented you from adding a layer twice