Fixed compiling errors after big merge.