protect kotlin workaround for JS