Fixed a bug in hopper protection