FIxed critical bugs.