Removed the cast from the event handler for the updateColor as it is handled later by the updateColor function