Finally fixed isAddressValid