Fix cegui gui rendering.
Fix type cast warnings.
Minor fixes.