Fixed a minor bug on tests