Fixed issue #1105 and little bug on installation

Fixed a bug when installing the CMS and issue #1105