silly logic bug