some bugfix whith attach