Bug fixes for Nacl port.