Fixed some incorrect defines
Further fixed incorrect defines
And removed some spare lines