stage clear fix

length should be layers.length