Merge back from develop3d

An actual bugfix for us, yeah!