Corrected earlier bugs