Fixed some issues with Unit Testing