fixed reinterpretations

changed reinterpret_cast calls to static_cast calls