Looks like some extra parenthesis were killing it. Fixed it up. Still has some debugging stuff in there.