Fix some of the casts
Merge pull request #1468 from MahApps/fix-casts

Fix some of the casts and a request