Fixing error with parsing gateway