Revert "minor main application bugs fix"

This reverts commit 99674fe0b6681448dda1aa48868e9827e8ff140b.