fix: we cannot calculate offset before we cleaning styles