Fixed getter and setter bugs in $declare