I just got up and I'd have to see the whole script, but it looks like you have the keys defined twice.