ported back changes from next to unstable