Bug finally solved