bugfix for under PHP5.2