Fix refresh bug and missing items

Fixed a bug which would cause some items to not be gemified and the page
to refresh early...