jquery path fix and cleaning