Fixed an undefined method error