remove redundant getShouldClose