Make the number detection more robust.