Add thread expanding, fix cursor