Fix illegal usage of type

Signed-off-by: Robert Xu <robxu9@gmail.com>