fixed a number of compile errors