add missing include and fix randBin