Fix tests, resolve #138