Fixed critical bugs!