Fixed bug where saving custom activity failed