Allocate sizes for message correctly