Examples in the question work, but the result is incorrect...