Fixed my stupid function