Fix some code ugliness I introduced