Fixing and making it actually work