fixed undefined var ref