Fix to prevent ValueError