Minor fix
CHA should not respect right margin / fix "write" behavior
Fix some bugs