Fix bug in element cast syntax