Fixed an error in inject() function.