Fix JS bug creation

* Do not send empty values
* Make sure multi value fields are sent as array