Fix to use property methods instead of using contents directly.