fix view attaching with callback