fixes selected item issue