Partial revert of last commit because I overlooked some things