Fixed protected mode switch and added printing