fixed a bug in ActivityController