Fix bug in test