Reworking code, found a huge flaw. -_-