Flag 2D-specific code, thanks @elemoine