some bugfixes for styles, stringify(editor), null

some bugfixes for style imports,
JSON.stringify(editor) (cycling),
possible null references