Fixed Attach bug