framework: fix reference leak in activiy manager