correct for cast error