cast to expected types, fix 'when?' graph widths