fixed to apply to 2D as well