Fixed several regressions