fix bugs and update winphone from the sdlpal