Modified function and added readme for fix