fixed relations transformation script