fix access log function

from valentine.