Fix type of global variables