Fix bug when using bind() with structs