Fixed more bad copypasta bugs (beginning to think it may have been spagetti after all)