Fixes lookup and adds var