Fixed updating of G value and parents