fix strict warning in anonymous function