Trying to eliminate strage thread-safety issue