Fixed some random bugs, added in better handling for apps like Chrome