fix generated code size calculation, add stub for client message