fix adding empty rect