cms updates
diff --git a/erpnext/patches/may_2012/cms.py b/erpnext/patches/may_2012/cms.py
index a77ee31..7b08754 100644
--- a/erpnext/patches/may_2012/cms.py
+++ b/erpnext/patches/may_2012/cms.py
@@ -4,4 +4,8 @@
 	from webnotes.model.code import get_obj
 	
 	# rewrite pages
-	get_obj('Website Settings').rewrite_pages()
\ No newline at end of file
+	get_obj('Website Settings').rewrite_pages()
+	
+	ss = get_obj('Style Settings')
+	ss.validate()
+	ss.on_update()
\ No newline at end of file
diff --git a/erpnext/website/doctype/website_settings/website_settings.py b/erpnext/website/doctype/website_settings/website_settings.py
index 6f0c4da..76c4307 100644
--- a/erpnext/website/doctype/website_settings/website_settings.py
+++ b/erpnext/website/doctype/website_settings/website_settings.py
@@ -26,11 +26,14 @@
 		"""
 		self.set_home_page()
 		self.validate_domain_list()	
+
+
+	def on_update(self):
 		self.rewrite_pages()
 		
 		from webnotes.session_cache import clear_cache
 		clear_cache('Guest')
-
+		
 	def rewrite_pages(self):
 		"""rewrite all web pages"""
 		import webnotes