fixing crash on bad tags