Fixed incorrect global definitions