Minor fixes. Casting.