Fixed a few bugs found from using the wrong setter or not handling null values properly.