catch awful bugs where undefined is cast to 0