Fixed cast error