fix selected_items table and orders table