remove unused code
bug fixed related to invokeblock