Fixed Some Cross-Platform Issues