logic fixes