Fixed compile errors from bad merge and using unsupported feature for old compilers