Bug fix

Bugs related to opening activity window fixed.