[ADDED]: Unit Test for issue 505