added test and fix
merged