misc cleanup, sys platform check