fix layers boundaries