Fixed error 500 when joining non-existent rooms. Contributed by @ezera.