Fixing a bug in the getting the payload