Fixes error with scope within loadbar.js