Fixes from Unit Testing