Update UI.js

changed position of call to checkCurrDoc()