error selecting item from the database