Updating tests and adding a small bugfix.