Tests for  #408
Tests for  #440