Fix crash.

Signed-off-by: Rikard Johansson <rillee.johansson@gmail.com>