Fixed one bug with close link, introduced another.