added relevant test for #520