Fixed invalid arguments for attach funciont