clean up modal close function