exception for bad encoding added