fixing some bugs with regular use reg and incorrect paths