Fixed the loading bar and a couple of other bugs

Squashed some bugs to make the application more stable and throw less
errors
Ignore this

Blame Visual studio