Style and bugfixes

String comparison with == is a no-no. Presumably property.guid used to be an int or long.