Fixed inconsistenci in security code generation