Added security check