Fix io not working with globals