Fix item metadata checking. Fixes #2