Fixed tests for #307