Fix issue where program closes when closing the RecordsWindow

This is caused because the default close operation is set to EXIT_ON_CLOSE.