minor casting changes