Fixed Compile errors untested