Bug fix
Fix tests