fixing php bug