Fix bugs found at ELS.