Activities refactoring bugs fixing