Fix for strftime and thread locking issues