Added checking diff on empty.