Fixed used of wrong variable

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>