logical fixes