Fix prematurely committed code to actually work as intended