Fixing crash on none value