my patch to use with firebase