Define proxy in constructor otherwise it will read globals to early