Further stability improvements, see issue #4