Fixes #1151 - add setter for format attribute