Fixed compile errors in Engine