fix bugs with ckeditor and mainImage