Fix layer-based rendering