Fixes an error which calls an undefined method