Fix crashing on ubuntu.