fix test and set behaviour