Fixed bug with protect