Merged recent changes from v1.55 and fixed few related bugs