Fixed issue #449 and fixed issue #450