fix of #509, related to php 5.3