fix for windows phone 8,1

I can't format the code of ths function :( sorry