Fix sending null to res