Fix throw type error