Make sure '0' get cast as 0 in operation cast

On my laptop, when setting key = Off, the cast function received '0' and it was returning that value instead of 0.