Moved a little code around.