Fixed and Updated code from github error