make gradient parsing a bit more robust