fix js from relation