fix bug in "basis"

Fix a simple bug that prevents the basis command from
working on a quotient ring where one of the variables
is zero.