Exception from Tracker afterFlush function

Hey,

I got a problem. I’m trying to build an app where I have route that looks like “/xy/:_id”. When you navigate to the route there should be load some data from a collection and displayed.

I’m using a helper to generate a SimpleSchema from a string that I loaded from my collection.
schema: function () { return new SimpleSchema(colleciton.findOne({}).schema); },

After creating the schema I use autoform to display the form. If I navigate to my route through the app it’s working like a charm, but if I try to open the url directly I get this error:
meteor.js:930 Exception from Tracker afterFlush function: meteor.js:930 TypeError: Cannot read property 'schema' of undefined

I see that my helper is not available right now, but I wonder how to make it work. Currently I’m using iron router, but I also switched to flowrouter. I think it’s not depending on the router and make a generell mistake here. Also jquery is not loaded a second time.

I hope someone can help me!