Merger another bugfix by Simon Kainz.