extra security checks for end of PoW

Signed-off-by: argakiig <argakiig@gmail.com>