Fixed NaNs being passed to gl