Made the changes to resolve the error