segmentation fault bug fix plus changes to reduce unncessary CAN traffic