Fix issue# 505