fixed bug in wsExists