Fix incorrect indexing. See http://extranet.powermemobile.com/issues/21295