fixing layer attribute