Fixes a new logic error