fixed a missing ENDIF and a minor cleanup

git-svn-id: svn://localhost:38911/repo/iss@22 83f2610d-e78a-492f-9b30-234388a31677