bug fixes for rc4