fixed wrong subroutine ending

The subroutine was not closing properly due to difference in the subroutine name.