Redo 033044b77ffbf039a31c4f701555161496f36518 and tweak code