bug fixes
remove php5 specific code