cleanup empty attributes from post fields