Fixed reversing order bug with sheets in refdb