Started fixing the type casting.