Fixed some crashes with some keys.