Global variables workaround