Better handling of undefined items