fixed things not changing layers as they should