Fixed crash + run thrust on gpu