Once a king wanted to organize a grand feast. He had got all kind of dishes prepared but there was one specific fish which he couldn't get. So he made an announcement in kingdom that whoever brings that fish to palace then he would be rewarded handsomely. Many fisherman tried but couldn't find that fish. Just day before feast a fisherman came with that big fish. At the entry of palace, gatekeeper asked him for reason to come. When fisherman told him about the fish and reward, gatekeeper told him that he would allow him only to go in if her promise to give him half the reward. Fisherman agreed. On seeing the fish king was highly pleased and wanted to reward him with lot of money but fisherman refused. Instead he demanded that he want hundred lashes on his back. King was surprised but as fisherman insisted at last he agreed. King ordered a servant to give him a hundred lashed. When fisherman had received fifty lashes he asked them to stop. He said, "I promised someone to share the half of reward with him. I would like to call him.."King asked, "Who is that person?"Fisherman replied, "Gatekeeper of this palace, when I was entering palace, gatekeeper told me that he would allow to come in only on one condition.. that is if I share half of my reward with him.."King understood whole situation and gatekeeper was given remaining fifty lashed and dismissed from his service. Fisherman was rewarded handsomely for his work and intelligence. 
Evil deeds results in bad things and your wise thinking can help you get out of bad situation. So be wise and do good. 