Bug fixes.

Added security for Activity.