fixed two tests and one bug