some stability improvements