[Tests] Fixed some tests which failed due to serialization issues.