Fix app crashing on launch in release mode.

Signed-off-by: Aron Cedercrantz <aron@cedercrantz.se>