Added function to avoid Back button behaivour.