Fixed(?) a possible bug that caused a crash (thread safety related)