PHP changes to fix php errors