Fixed: Some critical bugs