Revert "Revert "Fixing things from my last commit""

This reverts commit fe5452cdf83755e54ec1e25c1c97b1b9bb6fcb93.