fixing some cross platform stuff