fixed bug in apply when using . in string.