fixed error in modification generation