trying to get modal to rest on close