fix available items logic