Fixed logic error.  Tests should pass now