fix optional method ending identifier