Fixed tests to work properly.

#2557