Improve relation support, need to be tested