Fixes missing end.