Fixed closing bug!