fixed serious errors