fixing bugs in compute