Fixed cases where ripple array would get corrupted.