fixed bugs relating to multiple database queries being made on a single item selection.