fix typos and add custom RuntimeException