fix for https://bugs.openmw.org/issues/577