Revert "Revert "protect os, bugs remail""

This reverts commit 5c9dc373ad32170e4259ec126240de8933fa108a.
protect os, bugs remain