changed thread_safe in gem file