Fixed a bug in inject