Don't replace '$' at last position in class names