add guilayer and fix the viewbase error