fixed all 5 bugs, fixed failing tests, fixed canvas duplicate issue