 		'Submitting an op and closing straight after works': (test) ->
 			# This catches a real bug.
 			client.open @name, 'text', "http://localhost:#{@port}/sjs", (doc, error) =>
-				doc.insert 'hi', 0
+				doc.insert 0, 'hi'
 				doc.close ->
 					test.done()
 

					test.expect 4
					test.done()

				@model.applyOp @name, {v:0, op:[{i:'hi', p:0}]}, (data, error) ->
					test.ifError error

		'get a nonexistent document passes null to the callback': (test) ->

					throw new Error 'Should not have received op when the doc was unfollowed'
		
				doc.close =>
					@model.applyOp @name, {v:0, op:[{i:'asdf', p:0}]}, (version, error) =>
						test.done()

		'created locally is set on new docs': (test) ->
