Got task switching working, one minor bug though.