fixed all broken tests

Fix for #671

Fixed all broken tests.