Moved activity creation down.