complete fix for 1177