Refers #172 -- Fix unittests