added test case for #502