Corrected several small compile errors