small fix to prevent half-registered surface to be saved.