add some smal bug-fixes