fix access log function