Keyword dialog

Fix backward compatibility for keywords.
Fix wrong indentation.