fixed bug with application greater than 500 lines