Fixed compile errors

To be tested