Fixed queue modification in incorrect state