fixing some type confusion