fix bug, though i haven't tested it yet.