Core: fixed indexof error when checking whether to send sync or async request to change mobile theme.