Fix wrong behavior on malformed vector data