fix fishy behavior when trying to cast variable reference to std::size_t& from int&