improve support for bitcast