fix sub_atom, by  Paulo Moura.