Fixing PHP bugs