Fixed issue of passing petition to showPetition