adding switch depending on .net bug or php bug