Fixed some sensor reading segfaults;
Fixed light sensor reading mode