fix for http://bugs.openmw.org/issues/517
Merge remote-tracking branch 'lazydev/master'