Removed erroneous dict key lookups in create_activity()