Fix set method.

Leftover prototyping code was removed and modified again to work as intended.