Fix Logical Error