1.4.6: reference error on site_class. Fixed by a copy&patch