V1.2 : fixed compatibility issue with php 5.2