are you sure the fields are even set?
You could do some debugging:
print_r($fields);
die();
put that after you set the $fields variable. when you update a post it should then just send you to a white page within the admin with the $fields variable printed.