Fix errors in test