COOPR-581: fix code due to netty-http logic and improve statement creation