Fixing queue and ls matching