Some weird behavior i can't figure out.