             if /^(Unexpected token)/.test(error.message) # ATN: test that this is handled correctly
                 # Unexpected token, the server couldn't parse the protobuf message
                 # The truth is we don't know which query failed (unexpected token), but it seems safe to suppose in 99% that the last one failed.
-                @results_view.render_error(null, error)
+                @results_view_wrapper.render_error(null, error)
 
                 # We save the query since the callback will never be called.
                 @save_query

                    @databases_available = result

        handle_mousemove: (event) =>
            @results_view.handle_mousemove event
            @history_view.handle_mousemove event

        handle_mouseup: (event) =>
            @results_view.handle_mouseup event
            @history_view.handle_mouseup event

        handle_mousedown: (event) =>

                if @queries.length is 0
                    error = @query_error_template
                        no_query: true
                    @results_view_wrapper.render_error(null, error, true)
                else
                    @execute_portion()

            catch err
                # Missing brackets, so we display everything (we don't know if we properly splitted the query)
                @results_view_wrapper.render_error(@query, err, true)
                @save_query
                    query: @raw_query
                    broken_query: true
