Corrected some issues
Corrected some failing tests.