Fix tests bug