there was also a long tunnel in the palace to be used as an emergency exit in case of any attack , but that was hardly used as there was no ruler in india at that time to attack the heart of mughal empire .