Corrected a bug ocurring when used with ember-js