fixing some taint errors and globals