A bug fixed. Tests updated.