Fixed cortexscript logic!