Fixed thrown RuntimeError when omitting "end" parameter