Fix implicit global reference

Close #21, #17