Fixed various misdefinitions, reported by Cav0, thank's to him