Fixed a decimal visibility bug and added the unit test for it.