Bug fixes

Minor bug fixes in item.class.php