[0.9?] Fix portal creation crash.

also affects 0.9.