Logical fixes