Updating document class if it was renamed

Now.
Rename document class: ![2014-05-10 17 28 03](https://cloud.githubusercontent.com/assets/1700940/2936114/0e0dcbd2-d847-11e3-8946-348df4adf01f.png)
Result: ![2014-05-10 17 28 16](https://cloud.githubusercontent.com/assets/1700940/2936116/4763b37e-d847-11e3-9d04-d3d643a38560.png)

Result after fix: ![2014-05-10 17 32 40](https://cloud.githubusercontent.com/assets/1700940/2936126/cd3a8464-d847-11e3-8498-fd592958aa8c.png)