Fixing a bug, should work fine now