Fix selectAll error for issue #674