proper fix of int& error