Refresh on class change to fix #529 #737