It finally works. Don't you dare to ever touch this code again.