fixed wrong error handling for single coordinate