fix sending of undefined values