Fixed a bug with attributes being zero and overwritten by the defaults