Resolved some errors in tests