Refix on dot pkg rename bug

Added a check to match pkg paths