Fixed a compiling error on my end and a couple of warnings