Hey there Fabriciavieira,
I apologize about the late response, thank you for being patient! Were you able to fix that casting issue? If not, I'd be happy to help out, since error 500 isn't very specific. Let me just ask you some questions about what's happening:
I look forward to your response, and if you have any other questions or concerns for me, please let me know!