fix #2388. check types in reinterpret to make sure it will work.