Fix error with variable reference

Signed-off-by: Jonas Kalderstam <jonas@kalderstam.se>