Fixes for determining gateway capitalization balance