Fix some easy segfaults, optix code doesn't run yet