Improved support of changing css classes.