fixes #521

* Wrote test for activity started from actionbar
* Fixed issue #521