Fix #20: return err, server instead of just server