Fixes the mutex bug John was having