Fix js binding when creating a space