added critical bugs