Fixed item flag errors. Fixes #33