fix other logic mistakes