removed $type added in prev pull request according Simon Bartlett  request