safety procedures. revert if ok
trying to fix unsigned-signed warning