Fixed devicePtr indexing.