fixin php 5.3 closure bug