Fix Meteor integration and make more robust