Fixed bug for editing activity