Fixed compile problems

@windwarrior fix your own commits!