added sitelock code and a few other lines to help combat the random freezing