fixed #172 caused by a missing var