fix bgr layout