Made it actually work correctly