Fixes incompatible pointer calls to assign appropriate object.