Casting issue

When uploading project to another computer, an error popped up that was
fixed with Object-narrowing.