Fix bugs
Fix inspector window cannot display
Other code optimization