Fix layer issues