remove throw err, fix tests