I dont see the reason for the missing var here, especially as it is used in other functions