Further bug-fixes