- some logical fixes