Fixed sensor bug. Also addressed #30