Fix tests. Issue: #537