Fixed bug in activity edit