Fixed issue #315