minor main application bugs fix