The solution was already accepted in Talaria (https://github.com/xmidt-org/talaria/commit/3db2d63beee9e6ad84295fdfafd5c06e84392b44) and we just need to port it over here