fixed broken editor and javascript errors