send type explicitly and bug fixes