The whole code is not nice. I don't care since I have already made a big cleanup in master.