Updates to contextActivity handling