fixes javascript for custom label type