fixed an 'activity has leaked window'
Merge pull request #523 from betheg/leaked_window

fixed an 'activity has leaked window'