Testing various logic errors