Perhaps change this to if(windows)... and then just return once?