Added some conditional statements for path modification
Fixed conflict