Bug fix

Fixed issue where the order os sites wouldn't be saved. This was due to
a scoping problem where self was not defined.