Change to use setter instead of impl. detail.

Signed-off-by: Aron Cedercrantz <aron@cedercrantz.se>