Fix errors: gives correct results for test board