make appstate work for applications named other then myapp
Merge pull request #162 from jgawor/appstate

make appstate work for applications named other then myapp