Fix Types analysis to deal with globals