moved var check to somewhere where it might actually work. for a laugh