Fixes a bug where sensor were queried simultaneously on two threads.