Fix https error and error reporting