Some platform specific fixes