Fixed a very annoying bug with authorization error