Another cast error fixed