Fixed error with attach click