fixing some types/asserts