Add fix and test for BUG 408 from Eddie