Fix nil handling in add-last-open & add-last-closed.