fixing compile errors