fixing bug in the binding