Fixed reference creation and bindings