fixed 5 errors during compile.