Fix access violations while using wrong overload func