Fixed a little logic bug.