ported over from openms master
every time I think I have it all, I find more bugs