security fix EDB-ID: 32831
fixes of #199 + many more
fixes