Fix a bug in Parser and another one in Surface.update().