fixed crazy errors... I wonder what I was thinking