add cast for #5